import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class TestFile {
    public static void main(String[] args) throws IOException {
        FileOutputStream fio = new FileOutputStream("G:\\abc.txt");
        FileInputStream fis = new FileInputStream("G:\\ccc.txt");
        byte[] bytes = new byte[1024];
        int len;
        while ((len=fis.read(bytes))!=-1){
            fio.write(bytes,0,len);
        }
        fis.close();
        fio.close();
    }
}
